.TH std::error_category 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::error_category \- std::error_category

.SH Synopsis
   Defined in header <system_error>
   class error_category;             \fI(since C++11)\fP

   std::error_category serves as the base class for specific error category types, such
   as std::system_category, std::iostream_category, etc. Each specific category class
   defines the error_code - error_condition mapping and holds the explanatory strings
   for all error_conditions. The objects of error category classes are treated as
   singletons, passed by reference.

.SH Member functions

   constructor             constructs an error_category
                           \fI(public member function)\fP
   destructor              destructs an error_category
   \fB[virtual]\fP               \fI(virtual public member function)\fP
   operator=               not copy assignable
   [deleted]               \fI(public member function)\fP
   name                    obtains the name of the category
   \fB[virtual]\fP               \fI(virtual public member function)\fP
   default_error_condition maps error_code to error_condition
   \fB[virtual]\fP               \fI(virtual public member function)\fP
   equivalent              compares error_code and error_condition for equivalence
   \fB[virtual]\fP               \fI(virtual public member function)\fP
   message                 obtains the explanatory string
   \fB[virtual]\fP               \fI(virtual public member function)\fP
   operator==
   operator!=
   operator<               compares two error categories
   operator<=>             \fI(function)\fP
   (removed in C++20)
   (removed in C++20)
   (C++20)

   Specific error categories

   generic_category  identifies the generic error category
   \fI(C++11)\fP           \fI(function)\fP
   system_category   identifies the operating system error category
   \fI(C++11)\fP           \fI(function)\fP
   iostream_category identifies the iostream error category
   \fI(C++11)\fP           \fI(function)\fP
   future_category   identifies the future error category
   \fI(C++11)\fP           \fI(function)\fP

.SH See also


   error_condition holds a portable error code
   \fI(C++11)\fP         \fI(class)\fP
   error_code      holds a platform-dependent error code
   \fI(C++11)\fP         \fI(class)\fP
